<template>
  <div class="home">
    ssss{{ msg }}  <Button type="primary" @click="handleClick">Primary</Button>
    <br/>
    <span>计算结果{{ tools.calcAdd(20,30) }}</span>
    <br/>
    <Button type="info" @click="handleDownload">下载</Button>
  </div>
</template>

<script>
import AppLogo from '~/components/AppLogo.vue'
import {login} from '~/api/login'

export default {
  components: {

  },
  head: {
    title: '首页'
  },
  data(){
    return {
      msg:"测试"
    }
  },
  created(){
    console.log("生命周期函数==========",this.$store.getters.userInfo);
    // this.$requestPost("请求地址")
    console.log("计算结果2",this.tools.calcAdd(20,30));
    this.$axios.get(login,{headers:{abc:1111}}).then(res => {
      console.log("请求结果",res);
    });
    this.$nextTick(() => {
      this.getTable();
    })
  },
  methods: {
    getTable() {
      console.log("执行了")
    },
    handleClick(){
      this.msg = "测试是是 试试是是是是";
    },
    handleDownload(){
      //this.$download("/company/download/template") // 默认从当前请求域名去下载
      // 从这里指定的域名去下载
      this.$download("http://uat.website.yueplus.net/zyq/website/company/download/template")
    }
  },
}
</script>

<style scoped>
.img-item{
  overflow: hidden;
  height: 880px;
  text-align: center;
}
.img-item img{
  width: 100%;
  height: 100%;
  border: none;
  vertical-align: middle;
  overflow: hidden;
}
</style>

